package org.example.juc.thread;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author songyafei
 */
public class CallableDemo implements Callable<String> {




    public static void main(String[] args) throws Exception {
        CallableDemo callableDemo = new CallableDemo();
        ExecutorService executorService = Executors.newFixedThreadPool(2);
        executorService.submit(callableDemo);
        String result= callableDemo.call();
        System.out.println(result);
    }

    public String call() throws Exception {

            return "SUCCESS";

    }
}